package com.iuie.ns.frame.aware;

import javax.servlet.ServletContext;

import org.springframework.web.context.ServletContextAware;

import com.iuie.ns.frame.config.AppConfigUtil;

public class ResourcePathExposer implements ServletContextAware {

	private ServletContext servletContext;

	@Override
	public void setServletContext(ServletContext servletContext) {
		this.servletContext = servletContext;
	}

	public ServletContext getServletContext() {
		return this.servletContext;
	}

	public void init() {
		String version = AppConfigUtil.getInstance().getProperty("project.version");
		getServletContext().setAttribute("resourceVersion", version);
	}
}
